package com.itheima.day05.zuoye.ZuoYe4;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Scanner;

public class Old {
    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个人的生日：（/年/月/日）");
        String birth1 = sc.next();
        System.out.println("请输入第二个人的生日：（/年/月/日）");
        String birth2 = sc.next();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
        Long time1 =sdf.parse(birth1).getTime();
        Long time2 =sdf.parse(birth2).getTime();
        if(time1>time2){
            System.out.println("第一个人比第二个人小");
        }else if (time1<time2){
            System.out.println("第二个人比第一人小");
        }else{
            System.out.println("两人年龄相同");
        }


    }
}
